using SmartLink.EnumLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace SmartLink.DTOS.Account
{
    /// <summary>
    /// 用户基本信息
    /// </summary>
    public class UserBasicInfoUpdateDTO
    {
        /// <summary>
        /// ID
        /// </summary>
        [Required]
        public int ID { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        [Required(ErrorMessage = "姓名不能为空")]
        [MaxLength(50, ErrorMessage = "姓名最多50个字符")]
        public string NickName { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [RegularExpression(RegexPattern.MobilePhone, ErrorMessage = "手机号码格式错误")]
        public string UserMobile { get; set; }
        /// <summary>
        /// 部门Id
        /// </summary>
        public int? DeptId { get; set; }
        /// <summary>
        /// 工号
        /// </summary>
        [MaxLength(50, ErrorMessage = "工号最多50个字符")]
        public string JobNo { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public SexEnum Sex { get; set; } = SexEnum.Secret;
        /// <summary>
        /// 用户EMail
        /// </summary>		
        [RegularExpression(RegexPattern.Email, ErrorMessage = "电子邮箱格式错误")]
        public string UserEmail { get; set; }
        /// <summary>
        /// 用户电话
        /// </summary>
        [RegularExpression(RegexPattern.Phone, ErrorMessage = "电话号码格式错误")]
        public string UserPhone { get; set; }
        /// <summary>
        /// QQ
        /// </summary>
        [RegularExpression(RegexPattern.QQ, ErrorMessage = "QQ号码格式错误")]
        public string QQ { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? Birthday { get; set; }
        /// <summary>
        /// 微信
        /// </summary>
        [RegularExpression(RegexPattern.WeChat, ErrorMessage = "微信号格式错误")]
        public string WeChat { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public UserStatusEnum UserStatus { get; set; } = UserStatusEnum.启用;
    }
}
